
#include <net.h>

//*	Function Discription: 	Connect to rindexd with TCP
//*	Arguments:			pAddr		--- addr to connect to
//*				 		pFD			--- returned fd of the established TCP connection
//*  Return:
//*
Err rp_rpointd_net_conn_tcp(Addr*  pAddr, int* pFd)
{
	Err err;
	
	err = rp_comm_connect_tcp(pAddr, pFd);

	return err;
}

//*	Function Discroption: 	Sync the status with rindexd: sending the local file list to rindexd using TCP 
//*	Arguments:			pFD			--- returned fd of the established TCP connection
//*				 		
//*  Return:
//*
Err rp_rpointd_net_sync(int* pFd)
{
	Err err;
	char* pBuf;			// the data buffer to be sent to pFD

	// Get the local file list
	// .....

	err = rp_comm_send_tcp(pFd, pBuf);

	return err;
}

